<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/security/tags"
	prefix="sec"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://www.joda.org/joda/time/tags" prefix="joda"%>




<table id="dataTable"
	class="table table-striped table-bordered table-condensed table-hover">
	<caption>
		常规产品及厂内产品
	</caption>
	<thead>
	<tr>
	<td colspan="4">上报时间:<joda:format value="${report.createDate}" pattern="yyyy-MM-dd"/></td>
	<td colspan="4">上报人: ${report.maker.localName}</td>
	</tr>	
		<tr>
			<th rowspan="2" >代码</th>
			<th rowspan="2" >名称</th>
			<th colspan="2" class="number-field">期初结存</th>
			<th rowspan="2" class="number-field">本月计划</th>
			<th colspan="2" class="number-field">动工数</th>
			<th colspan="2" class="number-field">合格数</th>
			<th colspan="2" class="number-field">废品数</th>
			<th colspan="2" class="number-field">试销数</th>
			<th rowspan="2" class="number-field">期末数</th>
			<th rowspan="2">备注</th>
			<th rowspan="2">产品类型</th>			
		</tr>
		<tr>
			<th>年初</th>
			<th>月初</th>
			<th>当日</th>
			<th>累计</th>
			<th>当日</th>
			<th>累计</th>
			<th>当日</th>
			<th>累计</th>
			<th>当日</th>
			<th>累计</th>
		</tr>
	</thead>

	<c:set var="gindex" value="0" scope="request" />
	<%
		org.jackysoft.entity.ProductType[] ptypes = org.jackysoft.entity.ProductType
		.values();
		pageContext.setAttribute("ptypes", ptypes);
	%>

	<tbody id="pdtBody">

		<!-- 常规产品 -->
		<tr>
			<td colspan="18" style="background-color: #bbb"><span
				style="color: 000; font-size: 14px; font-weight: bolder">常规产品</span>

			</td>
		</tr>
		<c:set var="armItems" value="${report.classifiedItems['常规产品']}" />

		<%@ include file="armItemList.jsp"%>
		<tr>
			<td colspan="18">&copy;</td>
		</tr>

		<!-- 成品-->
		<tr>
			<td colspan="18" style="background-color: #aaa"><span
				style="color: 000; font-size: 14px; font-weight: bolder">厂内配套</span>

			</td>
		</tr>
		<c:set var="armItems" value="${report.classifiedItems['厂内配套']}" />
		<%@ include file="armItemList.jsp"%>
		<tr>
			<td colspan="18">&copy;</td>
		</tr>


		<!-- 半成品 -->
		<tr>
			<td colspan="18" style="background-color: #aaa"><span
				style="color: 000; font-size: 14px; font-weight: bolder">其他</span></td>
		</tr>
		<c:set var="armItems" value="${report.classifiedItems['其他']}" />
		<%@ include file="armItemList.jsp"%>
		<tr>
			<td colspan="18">&copy;</td>
		</tr>

	</tbody>
	<tfoot>
		<tr>
			<td colspan="18">&copy;2011-2012</td>
		</tr>
	</tfoot>

</table>
<table class="table  table-striped table-condensed table-bordered table-hover ">
			<caption>
				科研产品及其他产品
			</caption>
     <thead>
        <tr>
         <th>代码</th>
         <th>名称</th>
         <th>年初</th>
         <th>月初</th>
         <th>今日动工</th>
         <th>动工累计</th>
         <th>今日合格</th>
         <th>合格累计</th>
         <th>今日废品</th>
         <th>废品累计</th>
         <th>今日试销</th>
         <th>试销累计</th>
         <th>期末结存</th>
         <th>备注</th>
         <th>类型</th>
        </tr>
     </thead>
     	<c:set var="armItems" value="${report.researchItems}" />
		<tbody>
		  <%@ include file="armItemList-research.jsp"%>
        </tbody>
    </table>